Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 7 - Control Statements


Considering and Ignoring Statements

Considering statements allow you to control the way AppleScript executes operations and commands by listing specific characteristics, called attributes,
to be taken into account as the operations and commands are executed. Ignoring statements work the same way, except that you list specific attributes to be ignored.

The attributes you can use include

Here's an example of a string comparison without a Considering statement:

"This" = "this"--result: true
The value of the string comparison is true, because by default, AppleScript does not distinguish uppercase from lowercase letters.

Here's an example of the same comparison within a Considering statement:

considering case
   "This" = "this"end considering
--result: false
The Considering statement specifies that a particular attribute of strings-their case--is to be used in comparisons. As a result the comparison "This" = "this" is now false, because the uppercase "T" in "This"
does not match the lowercase "t" in "this".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996